# Maintainer:
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=libvdpau
pkgver=1.5
pkgrel=1
pkgdesc="Nvidia VDPAU library"
arch=(x86_64)
url='https://www.freedesktop.org/wiki/Software/VDPAU/'
depends=('libxext')
license=('custom')
source=(https://gitlab.freedesktop.org/vdpau/libvdpau/-/archive/$pkgver/$pkgname-$pkgver.tar.gz)
makedepends=('xorgproto' 'meson')
sha256sums=('66490802f30426d30ff9e8af35263bbbbaa23b52d0a2d797d06959c3d19638fd')

build() {
  arch-meson $pkgname-$pkgver build
  ninja -C build
}

check() {
  ninja -C build test
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install
  install -Dm 644 $pkgname-$pkgver/COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
